package com.sinbad.common.core.exception;

/**
 * 公用错误码
 */
public enum CommonErrorCode implements ErrorCode {

    E200(200, "成功"),

    // 通用错误信息
    E100000(100000,"系统异常，请稍后再试"),
    E100001(100001,"请求参数异常"),
    E100002(100002,"根据请求参数获取不到数据"),
    E100003(100003,"不符合业务逻辑"),
    E100004(100004,"无效的状态"),
    E100005(100005,"网络出错"),
    E100006(100006,"数据已存在"),
    E100007(100007,"上传文件参数不正确"),
    E100008(100008,"上传文件失败"),
    E100099(100099,"登陆失效，请重新登录"),
    E100010(100010,"无效的请求方式"),
    E100011(100011,"请求token为空"),
    E100012(100012,"请求token已过期"),
    E100013(100013,"接口调用出错"),
    E100014(100014,"登录认证失败"),
    E100015(100015,"无效的token信息"),
    E100016(100016,"无操作权限"),
    E100017(100017,"数据修改失败"),
    E100018(100018,"查询结果为空"),
    E100019(100019,"数据保存失败"),
    E100020(100020,"未获取到手术id"),
    E100021(100021,"创建分页信息失败"),
    E100022(100022,"参数为空"),
    E100023(100023,"token格式非法"),
    E100024(100024,"gateway秘钥不存在"),
    E100025(100025,"请求头缺失gateway秘钥"),
    E100026(100026,"gateway秘钥不正确"),
    E100027(100027,"账号或密码为空"),
    E100028(100028,"账号已经存在"),
    E100029(100029,"未查询到相关医院信息"),
    E100030(100030,"日期格式非法"),
    E100031(100031,"传入的任务编号为空"),
    E100032(100032,"传入的院区代码为空"),
    E100033(100033,"传入的患者信息为空"),
    E100034(100034,"传入的患者信息为空"),
    E100035(100035,"上传的key为空"),
    E100036(100036,"上传的统计信息为空"),
    E100037(100037,"上传的统计信息存在空值"),
    E100038(100038,"院区编码为空"),
    E100039(100039,"日期为空"),
    E100040(100040,"项目代码为空"),
    E100041(100041,"分区代码为空"),
    E100042(100042,"传入的统计信息字段名非法"),
    E100043(100043,"用户未登录"),
    E100044(100044,"未获与到缓存数据"),
    E100045(100045,"配置已经存在"),
    E100046(100046,"传入的主键为空"),
    E100047(100047,"传入的事件code为空"),
    E100048(100048,"未查询到医院信息");


    CommonErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    private int code;

    private String message;

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getMsg() {
        return message;
    }

    @Override
    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public void setMsg(String msg) {
        this.message = msg;
    }
}
